package file

import(
	"path/filepath"
	"os"
)

func Ls(dir string) []string {
	current_dir,_:= os.Open(dir)

	result, err := current_dir.Readdirnames(-1)
	if err != nil {
		panic("read file fail")
	}

	return result
}

func Pwd(dir string) string {
	abs_path, err := filepath.Abs(dir)
	if err != nil {
		panic("path not exist")
	}
	return abs_path
}


